package com.lanqiao.guimei.vo;

/**
 * @author 张建平 on 2019/8/10.
 */
public class CartItem {

    private Product product;
    /** 数量 */
    private int quantity;




    public CartItem() {
    }

    public CartItem(Product product, int quantity) {
        this.product = product;
        this.quantity = quantity;
    }

    public Product getProduct() {
        return product;
    }

    public void setProduct(Product product) {
        this.product = product;
    }

    public int getQuantity() {
        return quantity;
    }

    public void setQuantity(int quantity) {
        this.quantity = quantity;
    }

    /**
     * 小计
     */
    public Double getSubPrice() {
        return (this.product.getPrice()*this.quantity);
    }

}
